home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / irix / cc_c++_make_csh / csh.qr < prev    next >
Encoding:
Text File  |  1994-08-02  |  5.0 KB  |  124 lines

  1.    
  2.                            C shell quick reference
  3.     
  4.     This file is a quick reference to important information about csh.
  5.     
  6.     History modifications:
  7.         Format of history specification:
  8.             <event>[:<position>][:<action>]
  9.     
  10.         <event>     Can be one of the following:
  11.                     !!      Previous command line.  Equivalent to !-1.
  12.                     !-N     Command line N lines ago.
  13.                     !N      Command line N.
  14.                     !C      Command line starting with characters C.
  15.                     !?C?    Command line containing characters C.
  16.         <position>  Can be one of the following:
  17.                     0       Command word.
  18.                     N       Word position N.
  19.                     N-M     Word positions N through M.
  20.                     ^       Word position 1.
  21.                     $       Last word position in command.
  22.                     %       Matches the word that the <event> found when
  23.                             using !?C? form used.
  24.                     -N      Word positions 0 through N.
  25.                     *       Word positions 1 through $.
  26.                     N*      Word positions N through $.
  27.                     N-      Word positions N through $-1.
  28.         <action>    Can be one of the following:
  29.                     h       Remove trailing pathname component, leaving
  30.                             the head.
  31.                     r       Remove extension.
  32.                     e       Remove all but the extension.  Also removes
  33.                             the period.
  34.                     s/N/M/  Substitute M for N.
  35.                     t       Remove all leading pathname components leaving
  36.                             just the file name and extension.
  37.                     &       Repeate the previous substitution.
  38.                     g       Apply change globally.
  39.                     p       Print the new command without executing it.
  40.                     q       Quote the substituted words, preventing
  41.                             additional substitutions.
  42.                     x       Like q but break into words at blanks.
  43.     
  44.     Variable Substitutions:
  45.         Can be modified with : operator:
  46.             $name
  47.             ${name}
  48.     
  49.             $name[word]
  50.             ${name[word]}
  51.     
  52.             $#name
  53.             ${#name}
  54.     
  55.             $0
  56.     
  57.             $N
  58.             ${N}
  59.     
  60.             $*
  61.     
  62.         Cannot be modified with : operator:
  63.             $?name
  64.             ${?name}
  65.     
  66.             $?0
  67.     
  68.             $$
  69.     
  70.             $<
  71.     
  72.     Input/Output Redirection:
  73.         < name      Change stdin to file/device 'name'.
  74.         << word     Provide shell input up to line which is identical to
  75.                     'word' as stdin.
  76.         > name      Change stdout to file/device 'name'.
  77.         >! name     Change stdout to file/device 'name' and override
  78.                     'noclobber' variable.
  79.         >& name     Change stderr and stdout to file/device 'name'.
  80.         >&! name    Change stderr and stdout to file/device 'name' and
  81.                     override 'nclobber' variable.
  82.         >> name     Change stdout to append to file/device 'name'.
  83.         >>! name    Change stdout to append to file/device 'name' and
  84.                     override 'noclobber' variable.
  85.         >>& name    Change stderr and stdout to append to file/device
  86.                     'name'.
  87.         >>&! name   Change stderr and stdout to append to file/device
  88.                     'name' and override 'noclobber' variable.
  89.     
  90.     File Enquiries:
  91.             r       read access
  92.             w       write access
  93.             x       execute access
  94.             e       existence
  95.             o       ownership
  96.             z       zero size
  97.             f       plain file
  98.             d       directory
  99.             l       symbolic link
  100.             c       character special file
  101.             b       block special file
  102.             p       named pipe (fifo)
  103.             u       set-user-ID bit is set
  104.             g       set-group-ID bit is set
  105.             k       sticky bit is set
  106.             s       size is greater than 0
  107.             t       open file descriptor for terminal device
  108.     
  109.     Command line parameters to csh:
  110.             -b      All further arguments on the command line are to be
  111.                     ignored.  Further options are passed to a shell script
  112.                     run by csh.
  113.             -c      The rest of the arguments are a command to be run.
  114.             -e      Exit if any command terminates abnormally.
  115.             -f      Do not read any commands from .cshrc.
  116.             -i      Interactive even if stdin is not a terminal.
  117.             -n      Parse commands but don't execute them.
  118.             -s      Commands are read from stdin.
  119.             -t      A single line of input is read and executed.
  120.             -v      Set the 'verbose' variable.
  121.             -x      Set the 'echo' variable.
  122.             -V      Set the 'verbose' variable before reading .cshrc.
  123.             -X      Set the 'echo' variable before reading .cshrc.
  124.